Optimal. Leaf size=308 \[ -\frac {\left (a+c x^2\right )^{3/2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )}+\frac {\tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (a f h^2+2 c \left (3 f g^2-h (2 e g-d h)\right )\right )}{2 \sqrt {c} h^4}+\frac {\tanh ^{-1}\left (\frac {a h-c g x}{\sqrt {a+c x^2} \sqrt {a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)+c g \left (3 f g^2-h (2 e g-d h)\right )\right )}{h^4 \sqrt {a h^2+c g^2}}-\frac {\sqrt {a+c x^2} \left (2 \left (a h^2 (2 f g-e h)+c g \left (3 f g^2-h (2 e g-d h)\right )\right )-h x \left (a f h^2+c \left (3 f g^2-2 h (e g-d h)\right )\right )\right )}{2 h^3 \left (a h^2+c g^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.51, antiderivative size = 303, normalized size of antiderivative = 0.98, number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {1651, 815, 844, 217, 206, 725} \[ -\frac {\left (a+c x^2\right )^{3/2} \left (d h^2-e g h+f g^2\right )}{h (g+h x) \left (a h^2+c g^2\right )}-\frac {\sqrt {a+c x^2} \left (2 \left (a h^2 (2 f g-e h)-c g h (2 e g-d h)+3 c f g^3\right )-h x \left (a f h^2-2 c h (e g-d h)+3 c f g^2\right )\right )}{2 h^3 \left (a h^2+c g^2\right )}+\frac {\tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right ) \left (a f h^2-2 c h (2 e g-d h)+6 c f g^2\right )}{2 \sqrt {c} h^4}+\frac {\tanh ^{-1}\left (\frac {a h-c g x}{\sqrt {a+c x^2} \sqrt {a h^2+c g^2}}\right ) \left (a h^2 (2 f g-e h)-c g h (2 e g-d h)+3 c f g^3\right )}{h^4 \sqrt {a h^2+c g^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 217
Rule 725
Rule 815
Rule 844
Rule 1651
Rubi steps
\begin {align*} \int \frac {\sqrt {a+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^2} \, dx &=-\frac {\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac {\int \frac {\left (-c d g+a f g-a e h-\left (a f h-c \left (2 e g-\frac {3 f g^2}{h}-2 d h\right )\right ) x\right ) \sqrt {a+c x^2}}{g+h x} \, dx}{c g^2+a h^2}\\ &=-\frac {\left (2 \left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right )-h \left (3 c f g^2+a f h^2-2 c h (e g-d h)\right ) x\right ) \sqrt {a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )}-\frac {\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{h \left (c g^2+a h^2\right ) (g+h x)}-\frac {\int \frac {a c (3 f g-2 e h) \left (c g^2+a h^2\right )-\frac {c \left (c g^2+a h^2\right ) \left (6 c f g^2+a f h^2-2 c h (2 e g-d h)\right ) x}{h}}{(g+h x) \sqrt {a+c x^2}} \, dx}{2 c h^2 \left (c g^2+a h^2\right )}\\ &=-\frac {\left (2 \left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right )-h \left (3 c f g^2+a f h^2-2 c h (e g-d h)\right ) x\right ) \sqrt {a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )}-\frac {\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {\left (6 c f g^2+a f h^2-2 c h (2 e g-d h)\right ) \int \frac {1}{\sqrt {a+c x^2}} \, dx}{2 h^4}-\frac {\left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right ) \int \frac {1}{(g+h x) \sqrt {a+c x^2}} \, dx}{h^4}\\ &=-\frac {\left (2 \left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right )-h \left (3 c f g^2+a f h^2-2 c h (e g-d h)\right ) x\right ) \sqrt {a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )}-\frac {\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {\left (6 c f g^2+a f h^2-2 c h (2 e g-d h)\right ) \operatorname {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{2 h^4}+\frac {\left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right ) \operatorname {Subst}\left (\int \frac {1}{c g^2+a h^2-x^2} \, dx,x,\frac {a h-c g x}{\sqrt {a+c x^2}}\right )}{h^4}\\ &=-\frac {\left (2 \left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right )-h \left (3 c f g^2+a f h^2-2 c h (e g-d h)\right ) x\right ) \sqrt {a+c x^2}}{2 h^3 \left (c g^2+a h^2\right )}-\frac {\left (f g^2-e g h+d h^2\right ) \left (a+c x^2\right )^{3/2}}{h \left (c g^2+a h^2\right ) (g+h x)}+\frac {\left (6 c f g^2+a f h^2-2 c h (2 e g-d h)\right ) \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{2 \sqrt {c} h^4}+\frac {\left (3 c f g^3-c g h (2 e g-d h)+a h^2 (2 f g-e h)\right ) \tanh ^{-1}\left (\frac {a h-c g x}{\sqrt {c g^2+a h^2} \sqrt {a+c x^2}}\right )}{h^4 \sqrt {c g^2+a h^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 264, normalized size = 0.86 \[ \frac {\frac {h \sqrt {a+c x^2} \left (2 h (-d h+2 e g+e h x)+f \left (-6 g^2-3 g h x+h^2 x^2\right )\right )}{g+h x}+\frac {\log \left (\sqrt {c} \sqrt {a+c x^2}+c x\right ) \left (a f h^2+2 c h (d h-2 e g)+6 c f g^2\right )}{\sqrt {c}}+\frac {2 \log \left (\sqrt {a+c x^2} \sqrt {a h^2+c g^2}+a h-c g x\right ) \left (a h^2 (2 f g-e h)+c g h (d h-2 e g)+3 c f g^3\right )}{\sqrt {a h^2+c g^2}}-\frac {2 \log (g+h x) \left (a h^2 (2 f g-e h)+c g h (d h-2 e g)+3 c f g^3\right )}{\sqrt {a h^2+c g^2}}}{2 h^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 2818, normalized size = 9.15 \[ \text {output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 478, normalized size = 1.55 \[ -\frac {\sqrt {c x^{2} + a} f g^{2}}{h^{4} x + g h^{3}} + \frac {\sqrt {c x^{2} + a} e g}{h^{3} x + g h^{2}} - \frac {\sqrt {c x^{2} + a} d}{h^{2} x + g h} + \frac {\sqrt {c x^{2} + a} f x}{2 \, h^{2}} + \frac {3 \, \sqrt {c} f g^{2} \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{h^{4}} - \frac {2 \, \sqrt {c} e g \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{h^{3}} + \frac {\sqrt {c} d \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{h^{2}} + \frac {a f \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {c} h^{2}} - \frac {c f g^{3} \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{\sqrt {a + \frac {c g^{2}}{h^{2}}} h^{5}} + \frac {c e g^{2} \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{\sqrt {a + \frac {c g^{2}}{h^{2}}} h^{4}} - \frac {c d g \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{\sqrt {a + \frac {c g^{2}}{h^{2}}} h^{3}} - \frac {2 \, \sqrt {a + \frac {c g^{2}}{h^{2}}} f g \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{h^{3}} + \frac {\sqrt {a + \frac {c g^{2}}{h^{2}}} e \operatorname {arsinh}\left (\frac {c g x}{\sqrt {a c} {\left | h x + g \right |}} - \frac {a h}{\sqrt {a c} {\left | h x + g \right |}}\right )}{h^{2}} - \frac {2 \, \sqrt {c x^{2} + a} f g}{h^{3}} + \frac {\sqrt {c x^{2} + a} e}{h^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\sqrt {c\,x^2+a}\,\left (f\,x^2+e\,x+d\right )}{{\left (g+h\,x\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {a + c x^{2}} \left (d + e x + f x^{2}\right )}{\left (g + h x\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________